<%@ page import="driver.dao.SchoolDao" %>
<%@ page import="driver.entity.School" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: LSK
  Date: 2019/10/24
  Time: 21:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>西安学车管家</title>
    <link rel="shortcut icon" href="img/bitbug_favicon.ico">
    <link rel="stylesheet" href="bootstrap/dist/css/bootstrap.min.css">
    <title>Title</title>
    <style>
        body {
            padding: 0;
            margin: 0;
            overflow-x: hidden;
        }

        #container {
            opacity: 0;
            transition: all 0.8s ease;
            transform: translateX(100px)
        }
    </style>
</head>

<body>
    <%
    ArrayList<School> schools = new SchoolDao().select_school();
    pageContext.setAttribute("school",schools);
%>
    <div class="container" id="container" style="margin-top: 40px;">
        <table class="table table-bordered table-hover">
            <tr>
                <th>姓名</th>
                <th>手机号</th>
                <th>身份证号码</th>
                <th>驾校名称</th>
                <th>登录密码</th>
            </tr>
            <%
        for (int i = 0; i < schools.size(); i++) {
            pageContext.setAttribute("i",i);
            %>
            <tr>
                <td>${school.get(i).name}</td>
                <td>${school.get(i).phonenum}</td>
                <td>${school.get(i).idcard}</td>
                <td>${school.get(i).schoolname}</td>
                <td>${school.get(i).pass}</td>
            </tr>
            <%
        }
    %>
        </table>
    </div>
    <script src="jQuery/jquery-3.3.1.js"></script>
    <script src="bootstrap/dist/js/layui/layui.all.js"></script>
    <script>
        /* 鼠标特效 */
        var a_idx = 0;
        jQuery(document).ready(function ($) {
            $("body").click(function (e) {
                var a = ["富强", "民主", "文明", "和谐", "自由", "平等", "公正", "法治", "爱国", "敬业", "诚信", "友善"];
                var $i = $("<span/>").text(a[a_idx]);
                a_idx = (a_idx + 1) % a.length;
                var x = e.pageX,
                    y = e.pageY;
                $i.css({
                    "z-index": 9999999999999999999999999999999999999999,
                    "top": y - 20,
                    "left": x,
                    "position": "absolute",
                    "font-weight": "bold",
                    "color": "#ff6651"
                });
                $("body").append($i);
                $i.animate({
                        "top": y - 180,
                        "opacity": 0
                    },
                    1500,
                    function () {
                        $i.remove();
                    });
            });
        });
        //alert("用户名不存在，请联系管理员");
        $(function () {
            $('#container').css({
                "opacity": "1",
                "transform": "translateX(-30px)"
            })
        })
    </script>
</body>

</html>